<div class="container-fluid">
	<div class="row-fluid">
		<div class="span3">
			<ul class="nav nav-tabs nav-stacked">
				<li class="active"><a href="/filescan/index">待处理文件列表</a></li>
				<li><a href="/filescan/ignored">忽略文件列表</a></li>
				<li><a href="/filescan/isovered">已完成文件列表</a></li>
				<li><a href="/filescan/delete">已删除文件列表</a></li>
            </ul>					   
		</div>
	<div class="span9">
		<div class="clearfix txtleft search" style="margin-bottom:10px;">
			<form action="/filescan/index" method="get">
				校园:
				<select name="campus">
					<option value=''>==选择校区==</option>
					<*foreach from=$schoolinfo key=key item=vo*>
					<option value="<*$key*>" <*if $uid_class == $key*>selected<*/if*>><*$vo*></option>
					<*/foreach*>
				</select>
				<button type="submit" class="btn btn-success">查询</button>
			</form>
		</div>
		<form method="post" action="/filescan/ignorefile">
		<*if $fileinfo*>
        <table class="table table-hover">
			<tr>
				<th><label class="checkbox"><input type="checkbox" onclick="check_box(1);" /></label></th>
				<th>校区名称</th>
				<th>文件名</th>
				<th>共享时间</th>
				<th>操作</th>
			</tr>
			<*foreach from=$fileinfo key=key item=vo*>
			<tr>
				<td><label class="checkbox"><input type="checkbox" name="fileid[<*$vo.fileid*>]" /></label></td>
				<td><*$vo.schoolname*></td>
				<td class="span4"><a href="<*$vo.filepath*>"><*$vo.filename*><a></td>
				<td><*$vo.createdatetime*></td>
				<td>
					<a href="/filescan/ignorefile/fileid/<*$vo.fileid*>/campus/<*$uid_class*>/page/<*$curpage*>/operate/ignore" class="btn btn-info" onclick="return prompt();">忽略</a>
					<a href="/filescan/ignorefile/fileid/<*$vo.fileid*>/campus/<*$uid_class*>/page/<*$curpage*>/operate/isover" class="btn btn-primary">完成</a>
				</td>
			</tr>
			<*/foreach*>
			<tr>
				<td colspan="7"><*$page*></td>
			</tr>
			<tr>
				<td colspan='7'>
					<input type="checkbox" onclick="check_box(1);" /> 全选&nbsp;&nbsp;
					<input type="checkbox" onclick="check_box(2);" /> 取消&nbsp;&nbsp;
					<input type="checkbox" onclick="check_box(3);" /> 反选&nbsp;&nbsp;
					<button class="btn btn-info" type="submit" name="submit" value="submit" onclick="return isovcer(1);">忽略选中</button>
					<button class="btn btn-primary" type="submit" name="submit" value="submit" onclick="return isovcer(2);">完成选中</button>
					
					<input type="hidden" name="operate" value="" id="operate" />
				</td>
			</tr>
		</table>
        <*else*>
        暂时没有待处理文件！    
        <*/if*>
		</form>
	</div>
</div>
</div>
<script type="text/javascript">
	//checkbox 选中操作
	function check_box(typeid) {
		for(var i = 0;i<document.all.length;i++) {
			if(document.all[i].type == 'checkbox') {
				switch(typeid) {
					case 1:
						document.all[i].checked = true;
						break;
					case 2:
						document.all[i].checked = false;
						break;
					case 3:
						document.all[i].checked = document.all[i].checked ? false : true;
						break;
				}
			}
		}
	}
	//设置操作类别  忽略操作 或者 完成操作
	function isovcer(opid) {
		switch(opid) {
			case 1:
				$("#operate").attr("value", "ignore");
				if(confirm('是否要忽略选中文件！')) {
					return true;
				} else {
					return false;
				}
				break;
			case 2:
				$("#operate").attr("value", "isover");
				return true;
				break;
		}
	}
	
	//忽略时提示
	function prompt() {
		if(confirm('是否要忽略当前文件！')) {
			return true;
		} else {
			return false;
		}
	}
</script>





